package com.panda.pandawash.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.panda.pandawash.R;
import com.panda.pandawash.view.StatusBarCompat;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

@ContentView(R.layout.activity_service_no)
public class ServiceNoActivity extends AppCompatActivity {
    private String phoneNumber = "02157585111";

    @ViewInject(R.id.btn_service_return)
    private ImageView ic_return;

    @ViewInject(R.id.view_phone_help)
    private RelativeLayout mPhoneHelp;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.KITKAT) {
            StatusBarCompat.compat(this, getResources().getColor(R.color.colorPrimary));
        }
        x.view().inject(this);
    }

    @Event(R.id.btn_service_return)
    private void excultBack(View view) {
        finish();
    }
   @Event(R.id.view_phone_help)
    private void startPhone(View view) {
        //点击号码
        Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phoneNumber));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
    }

}
